import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import ElementPlus from "element-plus"
import 'element-plus/dist/index.css'

createApp(App).use(ElementPlus).use(store).use(router).mount('#app')



import instance from 'axios'
  // 请求拦截器
instance.interceptors.request.use(function (config) {
        let token = localStorage.getItem('token')
    
        if (token) { // 更新token时不携带token(2小时)
            config.headers.Authorization = token;
        }
        return config
    },
        function (err) {
            return Promise.reject(err)
        }
    )



